<div class="form-group text-center">
    <p>
        @if($img['src'])
            <img class="cover-img" src="{{route('image', [$img['src'], '250'])}}" />
        @else
            <img>
        @endif
    </p>
    <a href="javascript:void(0);" class="cover-{{$img['name']}} btn btn-primary btn-xl"><i class="fa fa-plus"></i><span class="file-name">{{$img['tip']}}</span></a>
    <input type="file" name="{{$img['name']}}" style="display: none;">
</div>
<script>
    $(document).ready(function () {
        $('.cover-{{$img['name']}}').click(function () {
            $('input[name={{$img['name']}}]').click();
        });
        $('input[name={{$img['name']}}]').on('change', function (event) {
            var file = event.target.files[0];
            var box = $(this).parents('div.form-group');

            box.find('img').attr('src', window.URL.createObjectURL(file)).addClass('cover-img');

            box.find('.file-name').text(file.name);
        });
    })
</script>